#region License

// Created by John Batte on 03/22/2012 at 7:30 AM.
// Last code cleanup: 03/22/2012 at 8:02 AM.
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#endregion

using System;

namespace BatteCode.Fx.ExceptionHandling
{
	/// <summary>
	/// 	Encapsulates the state of an exception being handled by the <see cref="Try" /> class.
	/// </summary>
	public class ExceptionState
	{
		/// <summary>
		/// 	Initializes a new instance of the <see cref="ExceptionState" /> class.
		/// </summary>
		/// <param name="exception"> The exception. </param>
		/// <param name="isHandled"> if set to <c>true</c> , the exception is handled. </param>
		public ExceptionState(Exception exception, bool isHandled)
		{
			Exception = exception;
			IsHandled = isHandled;
		}

		/// <summary>
		/// 	Gets or sets the exception.
		/// </summary>
		/// <value> The exception. </value>
		public Exception Exception{ get; set; }

		/// <summary>
		/// 	Gets or sets a value indicating whether the exception is handled.
		/// </summary>
		/// <value> <c>true</c> if the exception is handled; otherwise, <c>false</c> . </value>
		public bool IsHandled{ get; set; }
	}
}